<?php

namespace App;

use App\Http\Extend\Helper;
use Illuminate\Database\Eloquent\Model;

class EcmsHtfComment extends Model
{
    protected $table='phome_enewspl_htf';
    protected $primaryKey='id';
    public $timestamps=false;
    protected $guarded=[];

    /**
     * 开始时间
     * @param $value
     * @return false|string
     * create by wenQing
     */
    public function getCreateTimeAttribute($value)
    {
        return Helper::transDateTime($value);
    }

    /**
     * 更新时间
     * @param $value
     * @return false|string
     * create by wenQing
     */
    public function getUpdateTimeAttribute($value)
    {
        return $value;
    }

    /**
     * 手机号
     * @param $value
     * @return string
     * create by wenQing
     */
    public function getTelAttribute($value)
    {
        $pre = substr($value,0,3);
        $ext = substr($value,-4);
        return $pre.'****'.$ext;
    }
}